package com.djk.mapper;

import com.djk.pojo.Music;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 联想
* @description 针对表【lovemusic】的数据库操作Mapper
* @createDate 2024-02-19 22:45:43
* @Entity com.djk.pojo.Lovemusic
*/
@Mapper
public interface LovemusicMapper{
    /**
     * 查询收藏的music
     *
     * @param userId
     * @param musicId
     * @return
     */
    Integer queryLovemusic(Integer userId, Integer musicId);

    /**
     * 收藏music
     * @param userId
     * @param musicId
     * @return
     */
    Integer addLovemusic(@Param("userId") Integer userId, @Param("musicId") Integer musicId);

    int deleteLovemusic(Integer userId, Integer musicId);

    Integer deleteByMusicId(Integer id);

    List<Music> queryAllMyLove(Integer userId);

    List<Music> queryLovemusicByName(Integer userId, String musicName);

    Integer deleteByMusicIds(Integer userId,List<Integer> ids);
}




